package org.jsola.hr.task;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import com.xxl.job.core.log.XxlJobLogger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 关于甲方的一些消息通知
 */
@Slf4j
@Component
public class JiafangTask {

    @XxlJob("jiaFangContractExpireTask")
    public ReturnT<String> contractExpireTask(String params) {
        log.info("==========定时任务开始: 甲方合同到期发送通知");
        XxlJobLogger.log("==========定时任务开始: 甲方合同到期发送通知");
        try {

        } catch (Exception e) {
            log.info("==========定时任务失败: 甲方合同到期发送通知,失败原因 : {}", e);
            XxlJobLogger.log("==========定时任务失败: 甲方合同到期发送通知,失败原因 : {}", e.getMessage());
            return ReturnT.FAIL;
        }
        log.info("==========定时任务结束: 甲方合同到期发送通知");
        XxlJobLogger.log("==========定时任务结束: 甲方合同到期发送通知");
        return ReturnT.SUCCESS;
    }
}
